<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<body>
    <div id="app2">
        <p v-for="(item,index) in arr">
            <span>下标:{{index}}，数组项：{{arr}}</span>
        </p>
        <p v-for="(item,index) in obj">
            <span>下标:{{index}}，数组项：{{item}}</span>
        </p>
    </div>
    <script>
        new Vue({
            el:"#app2",
            data:{
                obj:{
                    key1:'val1',
                    key2:'val2'
                },
                arr:['arVal1','arrVal2']
            }
        })
    </script>
</body>
</html>